﻿using System;

namespace Apex.EventBus.Options
{
    /// <summary>
    /// 表示事件的名称的自定义属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class EventNameAttribute : Attribute
    {
        /// <summary>
        /// 初始化 EventNameAttribute 类的新实例
        /// </summary>
        /// <param name="name">事件的名称</param>
        public EventNameAttribute(string name)
        {
            Name = name;
        }

        /// <summary>
        /// 获取或设置事件的名称
        /// </summary>
        public string Name { get; init; }
    }
}
